﻿using SassModule.Entity;
using SassModule.ViewModel;
using System;
using System.Collections.Generic;

namespace SassModule.Contracts
{
    public interface IUserService
    {
        IEnumerable<User> Index(string dbStr = null);
        string Add(User info,string dbStr = null);
        void Del(Guid id, string dbStr = null);
        void Reset(UserPasswordViewModel user, string dbStr = null);
        LoginSuccessInfo Login(TokenViewModel info);
        User Index(Guid id, string dbStr=null);
        IEnumerable<Guid> GetRoles(Guid id, string dbStr=null);
        void SetRoles(Guid id, List<Guid> roles, string dbStr=null);
        /// <summary>
        /// 个人设置
        /// </summary>
        /// <param name="user"></param>
        /// <param name="dbStr"></param>
        string Setting(UserSetting user, string dbStr=null);

        /// <summary>
        /// 更新用户
        /// </summary>
        /// <param name="user"></param>
        void UpdateUser(User user);
    }
}
